package cn.yerly.sakura.dao.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
/**
 * 产品信息
 * @author yerly
 *
 */
@Entity
public class ItemInfo {
	@Id
	private Long id;
	@ManyToOne
	private Item item;
	@ManyToOne
	private Category category;
	@ManyToOne
	private ShopCategory shopCategory;
	private String title;
	private Double price;
	private Integer quantity;
	private String sn;
	private String barcode;
	private String description;
	private Date ctime;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public ShopCategory getShopCategory() {
		return shopCategory;
	}

	public void setShopCategory(ShopCategory shopCategory) {
		this.shopCategory = shopCategory;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public String getBarcode() {
		return barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "ItemInfo [id=" + id + ", item=" + item + ", category="
				+ category + ", shopCategory=" + shopCategory + ", title="
				+ title + ", price=" + price + ", quantity=" + quantity
				+ ", sn=" + sn + ", barcode=" + barcode + ", description="
				+ description + ", ctime=" + ctime + ", disabled=" + disabled
				+ "]";
	}

}
